//
//  UIImage+extension.m
//  SinaWeiBo123
//
//  Created by wujunjie on 2017/3/8.
//  Copyright © 2017年 wujunjie. All rights reserved.
//

#import "UIImage+extension.h"

@implementation UIImage (extension)

+(UIImage *)createAImageWithSize:(CGSize)size andColor:(UIColor*)color{
    UIGraphicsBeginImageContext(size);
    
    [color setFill];
    
    UIRectFill(CGRectMake(0, 0, size.width, size.height));
    
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return image;
}


@end
